<meta title="编辑管理员" width="650px" args="manager" />
<form role="form" id="managerForm" s="valid,form,datac,nda"
      class="form-horizontal"
      method="put"
      s-data="manager"
      style="padding: 20px;"
      action="/api/manager/{manager.id}">
    <div class="form-group" s-valid-role="item">
        <label class="col-sm-2 control-label">姓名：</label>
        <div class="col-sm-10">
            <input autocomplete="off" type="text" name="name" class="form-control" placeholder="名称" s-valid-error="require()">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">状态：</label>
        <div class="col-sm-10">
            <select class="form-control" name="locked">
                <option value="false">正常</option>
                <option value="true">锁定</option>
            </select>
        </div>
    </div>
</form>
<script type="text/javascript">
    S.meta.btns = [
        {
            name: "保存",
            style: "btn btn-primary",
            click: function(){
                return S.S("#managerForm").submit().done(function(rs){
                    S.close(rs);
                });
            }
        },
        {
            name: "关闭",
            style: "btn btn-default",
            click: function(){
                S.close();
            }
        }
    ]
</script>